// import { updateStatus } from './api';
    /***
     * @description axios封装
     * @file api.ts
     * @author andy
     * @date 2024/3/22 16:40
     */
// file:api.s
// 1、导入axios以及拦截器
import service from './request'

// demo接口1
export const demo1 = (data:any) => {
    return service({
        url: '/user/user/demo1/' + data,
        method: 'post'
    })
};


// demo接口2
export const demo2 = (data:any) => {
    return service({
        url: '/user/user/demo2',
        method: 'post',
        data
    })
};
// 登录接口
export const userLogin = (data:any) => {
    return service({
        url: '/user/index/userLogin',
        method: 'post',
        data
    })
};
// 权限菜单接口
export const getMenuList = () => {
    return service({
        url: '/user/index/getMenuList',
        method: 'post',
        
    })
};
// 用户列表
export const getUserList = (data:any) => {
    return service({
        url: '/user/index/userListPage',
        method: 'post',
        data
    })
};
// 用户修改
export const updateUser = (data:any) => {
    return service({
        url: '/user/index/updateUserById',
        method: 'post',
        data
    })
};

// demo接口1
export const deleteById = (userId:number) => {
    return service({
        url: '/user/index/deleteById/' + userId,
        method: 'post'
    })
};

// 用户批量删除
export const DeleteAll = (data:any) => {
    return service({
        url: '/user/index/DeleteAll',
        method: 'post',
        data
    })
};
// 用户审核
export const checkStatus = (data:any) => {
    return service({
        url: '/user/index/checkStatus',
        method: 'post',
        data
    })
};
// 商品列表分页
export const ProdList = (data:any) => {
    return service({
        url: '/brand/index/brandList',
        method: 'post',
        data
    })
};
// 添加品牌
export const savebrand = (data:any) => {
    return service({
        url: '/brand/index/addBrand',
        method: 'post',
        data
    })
};
// 修改品牌状态
export const updateBrandStatus = (data:any) => {
    return service({
        url: '/brand/index/updataStatus',
        method: 'post',
        data
    })
};

// 获取树状表单
export const getTreeTable = () => {
    return service({
        url: '/brand/type/getTreeTable',
        method: 'get',
        
    })
};
// 获取树状表单
export const deleteType = (id:any) => {
    return service({
        url: '/brand/type/deleteType/' + id,
        method: 'delete',
    })
};
// es商户列表
export const esUserlist = (data:any) => {
    return service({
        url: '/user/index/esUserList',
        method: 'post',
        data
    })
};
// 修改状态
export const updateTypeshow = (typeId:any,typeStatus:any) => {
    return service({
        url: '/brand/type/updateShow/'+ typeId +'/'+ typeStatus,
        method: 'post',
        
    })
};

//添加类型
export const saveTypeParent = (data:any) => {
    return service({
        url: '/brand/type/saveType',
        method: 'post',
        data
    })
};






